package yn.micro.common.exception;

import lombok.Getter;

/**
 * 全局异常.
 *
 * @author : yjs
 * @date: 2020-12-11 18:09
 */
@Getter
public class BaseException extends RuntimeException {

    private final Integer code;

    private final String errorMessage;

    public BaseException(AbstractBaseExceptionEnum exception) {
        super(exception.getMessage());
        this.code = exception.getCode();
        this.errorMessage = exception.getMessage();
    }
}
